import 'package:flutter/material.dart';

class Cell extends StatelessWidget {
  final Color bgColor;
  final String text;

  const Cell(this.text, {Key key, this.bgColor}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      color: bgColor ?? Colors.white,
      padding: EdgeInsets.symmetric(horizontal: 5),
      alignment: Alignment.center,
      child: Text(
        text.replaceAll('~', '~\n'),
        style: TextStyle(fontSize: text.contains('~') ? 14 : 16),
      ),
    );
  }
}
